package edu.bu.cs673.superkids123.test;

import javax.swing.JFrame;

import edu.bu.cs673.superkids123.AbstractFrame;
import edu.bu.cs673.superkids123.children.controller.ActivitiesMenuController;
import edu.bu.cs673.superkids123.children.controller.lessons.CountingLessonController;
import edu.bu.cs673.superkids123.children.controller.lessons.LessonResultsController;
import edu.bu.cs673.superkids123.children.view.ActivitiesMenuView;
import edu.bu.cs673.superkids123.children.view.ChildProfileView;
import edu.bu.cs673.superkids123.children.view.lessons.CountingLessonView;
import edu.bu.cs673.superkids123.children.view.lessons.LessonResultsView;
import edu.bu.cs673.superkids123.common.controller.AuthenticationController;
import edu.bu.cs673.superkids123.common.controller.LoginController;
import edu.bu.cs673.superkids123.common.view.LoginView;
import edu.bu.cs673.superkids123.common.view.ParentsLoginView;
import edu.bu.cs673.superkids123.parents.controller.CreateChildController;
import edu.bu.cs673.superkids123.parents.controller.CreateParentController;
import edu.bu.cs673.superkids123.parents.controller.ParentSettingsController;
import edu.bu.cs673.superkids123.parents.view.CreateChildView;
import edu.bu.cs673.superkids123.parents.view.CreateParentView;
import edu.bu.cs673.superkids123.parents.view.EditChildView;
import edu.bu.cs673.superkids123.parents.view.ParentSettingsView;

public class UITester extends AbstractFrame {

	/**
	 * Simple driver for the activities menu since it hasn't been added to the program flow yet.
	 * 
	 * @param args
	 */
	public static void main(String[] args) {
		javax.swing.SwingUtilities.invokeLater(new Runnable() {
			@Override
			public void run() {
				new UITester().show();
			}
		});

	}
	
	@Override
	protected void registerAllViews() {
		views.put(LoginView.class, new LoginView(this));
		views.put(CreateParentView.class, new CreateParentView(this));
		views.put(ParentSettingsView.class, new ParentSettingsView(this));
		views.put(ActivitiesMenuView.class, new ActivitiesMenuView(this));
		views.put(CountingLessonView.class, new CountingLessonView(this));
		views.put(CreateChildView.class, new CreateChildView(this));
		views.put(EditChildView.class, new EditChildView(this));
		views.put(ParentsLoginView.class, new ParentsLoginView(this));
		views.put(LessonResultsView.class, new LessonResultsView(this));
		views.put(ChildProfileView.class, new ChildProfileView(this));
	}

	@Override
	protected void registerAllControllers() {
		controllers.put(AuthenticationController.class, new AuthenticationController(this));
		
		controllers.put(LoginController.class, new LoginController(this));
		controllers.put(CreateParentController.class, new CreateParentController(this));
		controllers.put(CreateChildController.class, new CreateChildController(this));
		controllers.put(CreateChildController.class, new CreateChildController(this));
		controllers.put(ParentSettingsController.class, new ParentSettingsController(this));
		controllers.put(ActivitiesMenuController.class, new ActivitiesMenuController(this));
		controllers.put(CountingLessonController.class, new CountingLessonController(this));
		controllers.put(LessonResultsController.class, new LessonResultsController(this));
	}

	@Override
	protected JFrame layout() {
		
		//Child.setCurrent(new Child("Test Child"));
		
		/**
		 * Un-comment the UI you want to test
		 * */
		
		return frame("UI Tester", LoginView.class);
//		return frame("UI Tester", CreateParentView.class);
//		return frame("UI Tester", CountingLessonView.class);
//		return frame("UI Tester", LessonResultsView.class);
//		return frame("UI Tester", ParentsLoginView.class);
//		return frame("UI Tester", ActivitiesMenuView.class);
//		return frame("UI Tester", CreateChildView.class);
//		return frame("UI Tester", EditChildView.class);
//		return frame("UI Tester", ParentSettingsView.class);
//		return frame("UI Tester", ChildProfileView.class);
	}
}
